<template>
	<view>
		<nav-bar :isSearch="false" :menuData="menuList" :isBack="false">
		
			<template slot="title">
				<view> </view>
			</template>
			<template slot="content">报装记录</template>
		</nav-bar>
		<data-list :dataList="installList" @ontapitem="onTapItem"></data-list>
		
	</view>
</template>

<script>
	
	import menuData from '../../mock/menu-data.js'
	import NavBar from '../component/NavBar'
	
	import DataList from '../component/DataList'
	const app = getApp();
	export default {
		data() {
			return {
				menuList:menuData,
				installList:[]
				
			}
		},
		components:{
			NavBar,
			DataList
		},
		
		onLoad(){
			
			this.installList = app.globalData.deviceInfoList;
		},
		
		methods: {
			
			onTapItem(data){
				
				this.nav2Map(JSON.parse(data).id)
			},
			
			nav2Map(deviceId) {
				
				uni.reLaunch({
					url: "/pages/map/map?markerId=" + deviceId
				})
			},
			
		}
	}
</script>

<style>

</style>
